Commit Graph
20 Commits
Author SHA1 Message Date
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
David Wobrock 74a7ee9239 Remove remaining __future__ imports. 2022-07-23 11:59:50 +02:00
David Wobrock 813c5c8690 Remove apache license headers in each file. The one full copy of the license at the root of the repo shall define the license for all source files. 2020-01-11 22:08:33 +01:00
David Wobrock 484a775fda Linter Core: change lots of behaviour
* Use the Django migration classes to manipulate these objects
this includes the discovery of migrations through the MigrationLoader
(instead of manually walking through the Django project and find the migrations through a regex)
and representing a Migration through the Django class.
* Get the SQL of a migration through a 'call_command' call of 'sqlmigrate'
That speeds up greatly the linter since we don't have to setup Django for each migration
* Add the database to the cache path
2019-05-12 15:32:57 +02:00
David-Wobrock 999ee2fa5e unrelated: fix some warnings and redundant elements 2019-02-24 15:55:05 +01:00
David-Wobrock f5a587c2be Fix split path function
So it also works on windows
and does not return empty stuff
and update tests
2019-02-24 15:55:05 +01:00
David Wobrock 009153fbf4 handle linting a project in pwd
When calling "django-migration-linter ."
be able to handle it (especially with cache)
2019-01-20 12:17:11 +01:00
Felix 3ae4840e34 Merge branch 'master' into do-not-check-git-folder 2019-01-07 12:19:25 +01:00
Felix 92a686f13b Make imports relative 2019-01-05 22:24:33 +01:00
David-Wobrock 574af4b7fe Do not check if .git folder exists
git commands will fail anyway if not present
2019-01-04 21:42:39 +01:00
David-Wobrock 952e596d92 Bump copyright version to 2019 in files 2019-01-03 22:05:00 +01:00
David-Wobrock f05b199925 Black all files 2018-12-30 11:56:21 +01:00
Felix f351b71d6a Fix flake8 2018-12-20 14:53:25 +01:00
Felix b68c0183bb Finish up cache and fix tests.
Still TODO: Merge with ignore functionality.
2018-12-20 14:45:35 +01:00
Felix 9608e99150 #23 Fix errors and flake8 2018-12-18 15:54:47 +01:00
Felix b3815b6b98 #23 Add tests for caching 2018-12-18 15:33:26 +01:00
David-Wobrock 55e1e13ad5 Update copyright year to 2018 2018-01-07 12:15:23 +01:00
David-Wobrock fc8f405801 Fix tests, flake8 and update README 2017-11-30 00:09:18 +01:00
David Wobrock 50ce4f4cad Large code refactoring
* Add tests
* Remove git dependency (only needed when a git identifier is specified)
2017-11-29 23:57:23 +01:00