greedo / python-xbrl

xbrl parser written in Python :bulb:
https://pypi.python.org/pypi/python-xbrl
Apache License 2.0
220 stars 76 forks source link

issue 53: fix test #54

Closed yosukesan closed 2 years ago

yosukesan commented 3 years ago

Result follows. Test environment is identical to #53.

============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-3.10.1, py-1.7.0, pluggy-0.8.0
rootdir: /home/yosuke/Data/debian/python_xbrl/python-xbrl, inifile:
collected 15 items                                                             

tests/test_parse.py ...............                                      [100%]

=============================== warnings summary ===============================
tests/test_parse.py::test_parse_empty_file
  /usr/lib/python3/dist-packages/html5lib/_trie/_base.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import Mapping

-- Docs: https://docs.pytest.org/en/latest/warnings.html
==================== 15 passed, 1 warnings in 14.52 seconds ====================
yosukesan commented 3 years ago

Stop merging a bit. I forgot to pass pep8.

yosukesan commented 3 years ago

I misread the message. I think the patch is ready to merge. Just for note, I got following message. Probably better to switch pycodestyle or other linter, such as pyplakes, in test.

To fix E712, I can send another patch if you don't mind. Probably it's better to make another issue.

$ pep8
/home/yosuke/.local/lib/python3.7/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
/home/yosuke/.local/lib/python3.7/site-packages/pep8.py:2124: UserWarning: 

pep8 has been renamed to pycodestyle (GitHub issue #466)
Use of the pep8 tool will be removed in a future release.
Please install and use `pycodestyle` instead.

$ pip install pycodestyle
$ pycodestyle ...

  '\n\n'
./tests/xbrl.py:704:34: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./xbrl/xbrl.py:704:34: E712 comparison to True should be 'if cond is True:' or 'if cond:'