Comments (3)
Or alternatively is there a way to avoid this in my local config:
hooks:
- id: reorder-python-imports
files: \.pyi?$
types: []
... as using types_or
e.g.:
hooks:
- id: reorder-python-imports
types_or: [python, pyi]
... doesn't seem to do anything in the .pre-commit-config.yaml
. Does this setting only work for the hooks config, not the client side one?
from reorder-python-imports.
@Greedquest in your own config you'll also have to override types
, e.g. I think this should work:
hooks:
- id: reorder-python-imports
types_or: [python, pyi]
types: [text] # overwrite types: [python]
from reorder-python-imports.
@MarcoGorelli Oh that's kind of crazy but makes sense I suppose, thanks! Is types: [text]
the default value of types
, equivalent to what happens when you don't specify it in the hooks config? (i.e. I understand we need to override it locally, presumably setting it back to the equivalent of what it would have been if it were never specified in the first place?)
from reorder-python-imports.
Related Issues (20)
- Gracefully handle try, except blocks in imports HOT 3
- multiline import from same package? HOT 2
- Option to disable reordering HOT 4
- distutils ordered as a third-party package HOT 1
- Not numerically sorting HOT 2
- Sylink dirs treated as 3rd party modules HOT 6
- Option to disable import replacement HOT 1
- triple-quoted docstring with trailing backslash silently prevents reordering HOT 2
- Performance impact in having a single import per line HOT 3
- disable remove duplicates in argument HOT 1
- Support for ignoring certain files HOT 1
- Removes blank lines between comments HOT 2
- Relative import ordering HOT 10
- add-import with module without imports HOT 1
- Adding prober ignore files HOT 1
- can you please add the lxml library. HOT 9
- Support pyproject.toml
- winreg missing from six._moved_attributes on non-Windows platforms
- Better support for `_typeshed` imports 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 reorder-python-imports.