Comments (9)
I think this is just Pyright not being able to understand the code properly. I don't see anything wrong.
from exchangelib.
Just opened an issue at Pyright: microsoft/pyright#7378
from exchangelib.
Welp, pyright is blaming this repo for the error. Looking myself, it looks like it is perhaps an issue here. I think maybe we just need to export the list of attributes in an __all__ = [...]
list. I'd have to look at it harder though.
from exchangelib.
pydanny/cached-property#172 is probably real issue. threaded_cached_property doesn't play well with static analysis tools in general.
The easiest trick,
if TYPE_CHECKING:
my_prop = property
else:
my_prop = threaded_cached_property
from exchangelib.
Most of exchangelib was written long before type annotations became a Python feature. Adding full annotations is a huge effort that I will not undertake myself, at least.
from exchangelib.
I wasn't suggesting that we need full annotations; I do however thing that it makes sense to add hints on parts that are being labelled as errors
from exchangelib.
In this case, it looks like the real issue lies in the cached-property package. I think the issue should be solved there.
There are other places where static type checkers have a hard time reasoning about exchangelib code. I haven't seen any cases where there were actual errors, and refactoring turned out to be a lot of work for very little gain.
I'm closing this issue because exchangelib doesn't use Pyright. I'm not generally opposed to doing so, but please work on adding support in a PR instead.
from exchangelib.
@ecederstrand, would you be willing to help me write an issue for this in the cached-property
package? Or at least point me to the part where that issue needs to be referenced as an example of the issue?
from exchangelib.
The issue already exists. pydanny/cached-property#172 is the correct issue. Fixing that will fix the problem here.
from exchangelib.
Related Issues (20)
- ErrorInvalidSchemaVersionForMailboxVersion with exchangelib v5.2.1 and Exchange server version 15.2.1544.4 HOT 45
- EOF occurred in violation of protocol HOT 4
- ValueError trying to delete a rule HOT 2
- Error getting folders for v5.2.1+ (server 2010sp3 upd.29) HOT 3
- Cannot fetch calendar folder HOT 4
- Problem getting auth type from Exchange server HOT 15
- The request failed schema validation HOT 9
- Get more than 100 records with a.protocol.resolve_names HOT 1
- EWS does not support returning more than 100 results. See https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/resolvenames-operation
- How to disable check_hostname HOT 5
- some new distinguished folders cause 500 error HOT 4
- Support Custom Authentication Domains for Global and Governmental Environments (gcc-high, dod, etc) HOT 1
- Implement passing an Account object to GetUserAvailability in order to fix the "Returning naive datetime"-warning for timezone-unaware server responses. HOT 3
- Not enough scope error HOT 4
- OOF, The scheduled duration for sending automatic replies isn't valid HOT 4
- 403 Error | App Delegate Access for Personal Outlook Account HOT 5
- Accessing shared calendars does no longer work on 5.4.2 but it does work on 5.2.0 HOT 12
- Calendar items sent to users have reminder as 15 minutes regardless of reminder_is_set set to False HOT 1
- attachment.name returns None for Attached Outlook Items Despite Valid Subject HOT 4
- "Unsafe legacy renegotiation disabled" error in Python 3.12 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exchangelib.