Commit Graph

10 Commits

Author SHA1 Message Date
Nicolas F d8e796f3e0 Move to Python 3.7 and update dependencies (#551)
* forms: replace re._pattern_type with re.Pattern

Python 3.7 removed re._pattern_type and replaced it with
re.Pattern.

* readme: update for Python 3.7

* Update requirements

Also remove some unused ones which were neither a direct dependency
nor a dependency of our dependencies.

* account: force ASCII usernames on login form

Our database doesn't like it when we check for unicode data in
a column that stores ASCII data, so let's stop it before it
gets that far.

* Move travis CI to Python 3.7

* travis: use xenial dist

* fix newer linter warnings

Apparently bare excepts are literally Hitler, and we have some
new import sorting rules. Hooray!

* requirements: remove six

This is a dependency for sqlalchemy-utils, but we ourselves don't
depend on it directly because we've never been on Python 2 ever.

* Update requirements.txt
2019-08-10 18:39:53 -07:00
Kfir Hadas 024c90022a Nyaa development helper (tool) (#324)
Add new tool for developing (lint/autopep8/isort/test)

New tool uses flake8 and isort for lint checks.
Deprecate existing tool (still works)
Update readme
Update Travis config
2017-08-06 00:04:38 +03:00
Kfir Hadas 8a4793ffb0 Update Travis (#316)
* Update Travis to Trusty Q2 (they fixed the issue it had before, it works now)
* Fix charset in database creation on Travis to use `utf8mb4_unicode_ci`.
2017-07-29 03:24:05 +03:00
Kfir Hadas c466e76471 Fix RFC822 filters + More tests (#257)
* Make rfc822 filters compatible with Windows systems.

.strftime() is relative to the system it's being run on.
UNIX has '%s' for seconds since the EPOCH, Windows doesn't (ValueError).
Solution: use .timestamp() to achieve the same result on both platforms.
This also allows us to drop the float() around it, since it returns a float.

* Start testing filters

* Add placeholders for more tests

* Make 'tests' folder a Python package

Now you can run tests with just `pytest tests`

* Update readme and travis config

* Test timesince()

* Update and organize .gitignore

Deleted: (nothing)
Added: Coverage files, .idea\

* Test filter_truthy, category_name

* Tests for backend.py

* Tests for bencode.py

* Move (empty) test_models.py to tests package

* Tests for utils.py

* Fixes for flattenDict

* Change name to `flatten_dict`
* `newkey` was assigned but never used

* Add a helper class for testing

* Show coverage on Travis

(only Travis for now...)

* Remove IDE

* Use correct assert functions

* Update README.md
2017-07-07 16:14:37 -05:00
Kfir Hadas 9849a2bc14 Fix Travis (#285)
Reverts Trusty build environment version, because 2017Q2 breaks stuff.
2017-07-05 13:41:03 +03:00
Kfir Hadas 751378221f Add tests to Travis, fix lint script 2017-06-07 19:25:34 +03:00
Kfir Hadas 3165389d52 Fix lint check + update lint script (#224)
* Fix PEP8 E301 on nyaa/models.py

* Add utils/ to lint checker

* Run of lint.sh + manual fixes

As suggested https://github.com/nyaadevs/nyaa/pull/157#issuecomment-305051428

* Fix backwards tick in README

* Updated script

* Update Travis config
2017-06-01 06:40:33 -05:00
Kfir Hadas 2c5a577f7e Use pycodestyle 2017-05-17 12:25:55 +03:00
Kfir Hadas d7694d6c62 Disable email notifications 2017-05-17 11:20:42 +03:00
Kfir Hadas 9ad2264edf Travis config 2017-05-17 11:16:27 +03:00