Comments (6)
Issue-Label Bot is automatically applying the label feature_request
to this issue, with a confidence of 0.82. Please mark this comment with 👍 or 👎 to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
from loguru-mypy.
@Delgan if you have something more feel free to let me know :). If there are some users already, let us know too :)
from loguru-mypy.
There are different possible errors "at runtime", I guess we can figure out some of them by looking at the raise
statements in the loguru
sources.
Here are some examples of code causing exceptions but not detected by mypy
/ type-hints:
logger.add(sys.stderr, level=-10)
(negative level not allowed)logger.level("FOOBAR", no=-10)
(negative level not allowed)logger.log(-10, "Message")
(negative level not allowed)logger.level("INFO", no=111)
(updating theno
of an existing level is not allowed)logger.add("file.txt", foobar="xyz")
(theopen()
builtin does not have afoobar
argument)
There is also a whole range of "parsing" issues that I didn't listed (like parsing of color tags or rotation/retention).
from loguru-mypy.
Hmm...I think we can take some od those for later. @Delgan if you want to dive into wonderful world od mypy feel free to implement either of those 😁
from loguru-mypy.
Honestly, I don't think it's worth spending time implementing this. I was just throwing some ideas. 😁
from loguru-mypy.
well perhaps having levels defined as int
is enough. This is how typeshed does that. Maybe colors could be done like so if for example you requre hex like color codes, we could check against that. But that might low on prio for us.
I will keep this one here. If we people start using this plugin, they will be the best judge we can get ;)
from loguru-mypy.
Related Issues (18)
- Combine coverage and upload to external service. HOT 1
- Document project HOT 2
- Figure out possibility of tracking logger objects HOT 1
- Add catching of `record=True` HOT 4
- Draft first release HOT 2
- Add this to awesome-python-typing HOT 2
- Support attribute references of positional/keyword arguments with string formatting HOT 14
- Test against 3 latest releases of mypy + hard pin in plugin hook na latest HOT 2
- Embed logger options in returned type HOT 4
- "Internal error" while logging non-string messages HOT 4
- Using `mypy` to verify `check_str_format_call`? HOT 2
- Implement handling of `OpExpr`
- Implement handling of `CallExpr`
- False positive on `extra` kwargs HOT 3
- Releases are not working HOT 1
- Cannot import loguru.Writable HOT 6
- Support new mypy 1.0 version specifiers
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 loguru-mypy.