Commit graph

12 commits

Author SHA1 Message Date
Noortheen Raja
1c1fb997d4 chore: upgrade hooks 2022-03-22 19:13:11 +05:30
Noortheen Raja
8007561fb5 feat: add isort to project 2022-01-31 11:16:51 -05:00
Noortheen Raja
c51f91b259 refactor: update pre-commit hooks 2022-01-31 11:16:51 -05:00
Noorhteen Raja NJ
7c4e207abd
update test xsh usage (#4581)
* todo

* test: remove usage of DummyEnv and setting .env attribute on xession fixture

one step closer to making too much of tweaking to xession during tests

* test: fix tests vox and gitstatus-prompt

* docs: update test-fixture usage

* fix: import flake8 error

* test: remove direct access to XSH in tests

* test: remove usage of XSH in test files

* todo

* test: use tmp-dir to create stubs

* refactor: use fixture factory to mock out XonshSession

* refactor: remove direct access of XSH from functions

* refactor: remove direct access of XSH from functions

* fix: qa checks

* refactor: rename variables to match their values

* test: update failing tests because it had no PATH set previously

* fix: remove builtins usage from pyghooks.py

* style:

* refactor: update tests to use fixtures

* fix: env varialbe is setup per function

some tests accidentally update the env variables and that is leaking
into next tests

* fix: failing vox tests

* test: set commands_cache per test

* test: fix failing tests

* fix: failing tests on linux

ptk-highlight

* fix: failing tests on Windows

cwd-prompt

* test: copy env as to not affect original object

* fix: lazily evaluate cmds-cache in pyghooks

* test: fix failing tests

* fix: qa errors import

* test: set commands-cache per test

while caching path results

* test: speedup test_thread_local_swap

* fix: failing tests on windows

* refactor: Execer doesn't control session

* refactor: XSH.unload will take care of reversing builtins attrs set

* test: use env.update over monkeypatch

* Revert "test: use env.update over monkeypatch"

This reverts commit 010a5022247a098f1741966b8af1bf758663480e.
2022-01-07 17:33:22 -05:00
Noorhteen Raja NJ
c2d25ac251
pre-commit hook for pyupgrade (#4583)
* chore: add pyupgrade

* refactor: upgrade code to py3.7+

ran `pre-commit run pyupgrade -a` while excluding changes to ply

* fix: flake errors
2021-12-06 14:42:26 -05:00
Noorhteen Raja NJ
5dafceef47
chore: upgrade black and mypy (#4399)
* chore: upgrade black and mypy

* chore: update black config

ignore generated files from ply

* chore: upgrade pre-commit plugins
2021-07-29 18:31:52 -04:00
Daniel Shimon
214997d170
pre-commit: Lint tests dir (#4298) 2021-05-29 23:44:31 +03:00
Noorhteen Raja NJ
948129b7a0
feat: add flake8-bugbear (#4288)
* feat: add flake8-bugbear

* style: remove pylint disable comments

* chore: add flake8 as pre-push check

* chore: add bunch pf pre-commit hooks

* style: remove hasattr __call__
2021-05-26 23:15:34 +03:00
Noorhteen Raja NJ
fd597e6971
chore (ci): improve ci workflows and deps management (#3873)
* chore (ci): improve elm job speed by caching

* chore (ci): update ci generator script to be run from any dir

* chore: update pre-commit to use local black binary

* chore: mypy config skip amalgam generated modules

* chore: run-tests.xsh parameterisation

use argparser to make this file a cli

* feat: use requirements.txt during CI

* feat: run black/flake8/mypy during ci from pip-env

* chore: mypy version 0.790 fix

since the loose pinning on mypy version causes new PRs to fail

* refactor: update github actions template

remove poetry/environment.yml files
2020-10-19 11:52:37 -04:00
Sean Farley
67b97b9571 pre-commit: relax python version to any python version 3 2019-10-02 14:52:56 -05:00
Anthony Scopatz
952c74963f version black in precommit 2019-07-22 15:29:58 -04:00
Sean Farley
ec3d2ca8ad git: add pre-commit dependency
This also adds documentation for how to install this git pre-commit hook
which will run black before committing. The only downside to doing that
is the, perhaps confusing, initial run which will clone the black
repository before a dev's first commit.

Running on the command-line will be quite obvsious since the default
output shows what pre-commit is doing. But running in a gui or
editor (e.g. magit) will hide that. Viewer discretion is advised.
2019-07-13 15:44:23 -05:00