Commit Graph
17 Commits
Author SHA1 Message Date
Nicola Soranzo e975ca3754 Update to black 2024 stable style 2024-01-30 18:09:51 +00:00
Nicola Soranzo 7fee81607c Add linting with ruff
ruff (https://github.com/charliermarsh/ruff) is a new and extremely fast
Python linter, written in Rust.
Ruff can be used to replace Flake8 (plus a variety of plugins), isort,
pydocstyle, yesqa, eradicate, pyupgrade, and autoflake.
Here ruff is added to our current linters (flake8, flake8-bugbear and isort)
while we assess its reliability.
I've not enabled the isort rules because many of the options we use are not
implemented yet. I have instead enabled the pyupgrade rules (a tool which I
run manually every few months).

Also:
- Fix new linting errors reported by ruff.
2023-01-16 14:34:56 +00:00
John DavisandNicola Soranzo 67c7e7d1ac Use a simple cast instead of relying on dependency injection
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
2022-11-30 13:33:42 -05:00
John Davis cbabba8f49 Fix typing error in unit test 2022-11-29 14:59:17 -05:00
Nicola Soranzo de5e9c0e71 Add some type annotations to `WebApplication and GalaxyWebTransaction` 2022-11-28 04:50:03 +00:00
Nicola Soranzo c35d8f2a06 Replace `unittest.TestCase` with pytest-based partial re-implementation
Also:
- Rename `FooBarTestCase` test classes as `TestFooBar`. These were collected
  by pytest only because they were `unittest.TestCase` derived, but normally
  pytest collects only test classes whose name starts with `Test`, see
  https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-python_classes
2022-09-27 03:34:58 +01:00
Nicola Soranzo f3b04b8f26 Remove `unittest.main()` calls 2022-09-21 23:50:05 +01:00
Nicola Soranzo b5c7e2c86a Replace `self.assert* method calls with plain asserts in test/`
using https://github.com/pytest-dev/unittest2pytest with the following command:

```
unittest2pytest -f self_assert -w -n test/
```

(excluding ``self.assertRaises*`` method calls).
2022-09-21 23:50:05 +01:00
Dannon Baker 623a5e165a Apply black formatting.
Apply isort.
2022-02-03 07:42:20 -05:00
Nicola Soranzo 0bdc93a7cc Drop support for Python 3.6, add Python 3.10 2021-12-08 08:14:10 +00:00
Michael R. Crusoe 7819fdc7a6 tighten type ignores 2021-11-23 13:12:07 +01:00
John Chilton 85f93a2e8a More unit test cleanup. 2021-10-11 16:08:26 -04:00
John Chilton 7006e2a7e5 More unit test fixes. 2021-10-08 11:04:00 -04:00
John Chilton 096d856c1d Package galaxy_mock.py into galaxy-app and changes required to support that. 2021-10-07 11:04:47 -04:00
Nicola Soranzo 9d74bba7fb Drop support for retired Python 3.5
Upgrade syntax using `pyupgrade --py36-plus` .

Manually drop several `six` imports.

Also:
- Remove broken pr_cache in scripts/bootstrap_history.py
- Fix broken prefix removal in lib/galaxy/tool_util/deps/mulled/mulled_build.py
2020-10-07 11:52:13 +01:00
Sergey Golitsynskiy 65eb075287 Refactor to test allowed_origin_hostnames
- Enable testing of allowed_origin_hostnames config option
- Do not call kwargs.get() to obtain `allowed_origin_hostnames`: all
  kwargs are processed by BaseAppConfiguration uniformly.
2020-09-01 14:36:45 -04:00
John Chilton 488fe1971d Move galaxy.web.framework.webapp into galaxy-webapps because it use galaxy-app stuff. 2020-07-05 18:25:18 -04:00