David Wobrock
2ee7dac3b3
Add internal classes and add type hints + mypy.
2022-12-26 16:26:24 +01:00
Sondre Lillebø Gundersen
bd4eb89b8c
chore: Upgrade Python syntax with pyupgrade
...
Run with the following pre-commit configuration:
```
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.1.0
hooks:
- id: pyupgrade
args: [ "--py3-plus", "--py36-plus", "--py37-plus" ]
```
The rationale for every change can be found at https://github.com/asottile/pyupgrade
2022-11-03 22:00:00 +01:00
Phillip Verheyden
88a7b0812a
Allow project_root_path and verbosity to come from Django settings
...
And still fallback to DJANGO_SETTINGS_MODULE environ for project_root_path if not explicitly set
Fixes #203
2022-03-19 20:12:03 +01:00
David Wobrock
c2ad3e6aeb
Allow passing '--sql-analyser' to makemigrations command
2022-03-13 17:54:04 +01:00
David Wobrock
c7d9129db9
Adapt 'warnings-as-errors' option to allow taking migration test codes as input
2022-03-13 17:26:40 +01:00
David Wobrock
5f11f9417f
Refactor logging configuration to both Django management commands lintmigrations and makemigrations
2022-03-13 16:51:29 +01:00
David Wobrock
4fa6a33153
Fix #198 -- Allow using Django settings for linter configuration
2022-02-15 19:21:58 +01:00
David Wobrock
76a55dbb12
Raise when unsupported db vendor, and add option to specify SQL analyser
2022-01-30 15:20:18 +01:00
David Wobrock
85189b7c1d
Refactor config and toml files read into staticmethods
2022-01-28 21:48:05 +01:00
David Wobrock
5a6ddd0d63
Allow overriding any option through config file, and not only a subset
2022-01-28 21:48:05 +01:00
David Wobrock
419f90e728
Fix #119 -- Handle verbosity=0 level correctly and suppress all prints/logs
2021-06-26 13:29:01 +02:00
David Wobrock
6d595f1555
Add support for positional app_label and migration_name arguments
2021-05-26 18:53:19 +02:00
David Wobrock
bf525ae79d
Make git commit id a named CLI parameter
2021-05-26 18:53:19 +02:00
91e0147f9b
load config from pyproject.toml ( #143 )
...
* load-toml
* move toml to extras_require
* fix linter, add hint
* Update toml PR
- always install toml deps, we can add it to all installs
- don't override the command line config values with the ones from the config files
- handle getboolean again for configparser
- be able to have both a toml and another config file, and both configs are taken into account
* Add changelog message for later
Co-authored-by: aakrivonos <aakrivonos@domclick.ru >
Co-authored-by: David-Wobrock <david.wobrock@gmail.com >
2021-05-25 23:20:07 +02:00
David-Wobrock
2f3ce1d7cc
Remove toml support
2021-04-01 23:11:35 +02:00
David-Wobrock
b16081fecf
Fix linting
2021-02-04 22:00:59 +01:00
David Wobrock
48f199a91b
Use utf-8 encoding on config files
2021-02-04 19:28:09 +01:00
Łukasz Skarżyński
0750ecf593
remove .editorconfig from supported config files
2021-02-04 19:22:57 +01:00
David-Wobrock
137089573c
Implement include migration name options
2021-01-31 17:44:58 +01:00
David-Wobrock
1eccbbfc07
Fix configuration file for boolean values
2021-01-17 16:28:31 +01:00
David-Wobrock
2dc4caadf9
Implement config files
2021-01-17 16:28:31 +01:00
David-Wobrock
6ab1d58c47
Apply isort to the project
2020-11-30 21:46:40 +01:00
David Wobrock
0d8bc98f8e
Remove forgotten option from lintmigrations command
2020-07-02 19:15:30 +02:00
David Wobrock
a9cae8a21e
Refactor linting configuration parser options to a function
2020-07-02 19:15:30 +02:00
David Wobrock
9f22116541
Black the code
2020-02-07 23:29:15 +01:00
David Wobrock
e49f6dea9c
Document, add to changelog the data migrations and rename to 'warnings-as-errors' (plural)
2020-02-07 23:29:15 +01:00
David Wobrock
71614bd377
Handle warning as error and exclude warning tests
2020-02-07 23:29:15 +01:00
David Wobrock
3b8e86fdf7
Add 'quiet' to argparsing and pass it to the linter
2019-10-21 22:25:52 +02:00
yongming
dbebda65d9
Fix help in command line, fix read file
2019-10-10 22:50:17 +02:00
yongming
adf61dd669
Add command to only check migration files in a given file
2019-10-10 22:50:17 +02:00
David Wobrock
7215afa4a4
Fix line too long (flake8)
2019-07-28 12:28:56 +02:00
David Wobrock
af4b11c563
Document (README & CHANGELOG) and rename option to 'exclude-migration-tests'
2019-07-28 12:28:56 +02:00
vladmalynych
579e7c68b4
Fix linter issue
2019-07-28 12:28:56 +02:00
Vladyslav Malynych
8eede82a38
Exclude not critical test ( #2 )
...
* Exclude not critical test
* Add exclude-tests option
* Update documentation
* Clean forgotten print
* Improve Readme, with examples
2019-07-28 12:28:56 +02:00
Victor Seva
c0d33dd579
support setting DJANGO_PROJECT_FOLDER via --project-root-path
...
settings file can be located in a subdirectory of the project
2019-07-10 10:20:14 +02:00
David Wobrock
3273f1bdc4
Add exclusive options for linting only applied or unapplied migrations
2019-06-06 22:54:08 +02:00
David Wobrock
3b2b2f91c2
Clean up unused code and comments
2019-05-12 15:50:03 +02:00
Felix
0bf7d5cc39
Use relative imports for easier in-place testing
2019-05-12 15:32:57 +02:00
David Wobrock
0eb584889a
Add Django management command to launch the linter
2019-05-12 15:32:57 +02:00