| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminate some occurrences of the following flake8 errors in tests:
* E265 block comment should start with '# '
* E266 too many leading '#' for block comment
* E402 module level import not at top of file
* E712 comparison to False should be 'if cond is False:' or 'if not cond:'
* E712 comparison to True should be 'if cond is True:' or 'if cond:'
* E722 do not use bare 'except'
* F401 ... imported but unused
* F403 ... used; unable to detect undefined names
* F405 ... may be undefined, or defined from star imports: ...
* F541 f-string is missing placeholders
* F841 local variable 'result' is assigned to but never used
* N806 variable 'TEST_DIR' in function should be lowercase
This is pursuant to eliminating
[flakeheaven](https://github.com/flakeheaven/flakeheaven), as it no longer
supports the latest version of flake8
[[ref](https://github.com/flakeheaven/flakeheaven/issues/132)].
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into pyproject.toml (#2187)
Replaced setuptools with poetry which provides simpler dependency management, dependency locking and virtual environment management.
This makes it easier for new developers to get a sane development environment (i.e. just `poetry install`) and also makes our CI pipeline more reproducable as now most development tools and libraries will only change through dependabot which will reduce the build failures on main and make breaking changes in dependencies more visible with dependabot PRs.
Other changes:
- moved isort, mypy and coverage config from setup.cfg to pyproject.toml
- Changes in the generated rdflib wheel:
- removed wheel extras related to development (i.e. `tests`, `docs`, `dev`) as poetry dependency groups should be used instead.
- Added an extra group `lxml` with a dependency on lxml.
- Added version ranges to dependencies, and tests to ensure these version ranges are valid.
- Changes to tests:
- Change pyparsing related tests so they work with older pyparsing.
- Made the html5lib related tests conditional on html5lib existing.
- Runtime changes:
- Use importlib.metadata to set `__version__`.
- Changed the devcontainer and related config to avoid contamination and interference with the host environment.
Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
Co-authored-by: Edmond Chuc <edmond.chuc@outlook.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check datatype against `None` instead of checking it's truthiness (i.e.
`if datatype is not None:` instead of `if datatype:`).
Checking truthiness instead of `is not None` causes a blank string to
be treated the same as None. The consequence of this was that
`Literal.datatype` could be a `str`, a `URIRef` or `None`, instead of
just a `URIRef` or `None` as was seemingly intended.
Other changes:
- Changed the type of `Literal.datatype` to be `Optional[URIRef]`
instead of `Optional[str]` now that `str` will always be converted to
`URIRef` even if it is a blank string.
- Changed `rdflib.util._coalesce` to make it easier and safer to use
with a non-`None` default value.
- Changed `rdflib.util` to avoid issues with circular imports.
|
| |
|
|
| |
Fairly straight forward conversion, converted one skip to an xfail
though with an explanation of what is going wrong.
|
| |
|
|
|
|
|
|
| |
This PR implements a rename decided on [Issue 1960](https://github.com/RDFLib/rdflib/issues/1960).
References:
* https://github.com/RDFLib/rdflib/issues/1960
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
|
| |
|
|
|
| |
- Also, adding a function to reset bindings so tests are less
order-dependent
|
| |
|
|
| |
for more information, see https://pre-commit.ci
|
| |
|
|
|
|
|
|
|
|
| |
This patch removes unused imports in test code. This is mainly to remove
the potential snag for flake8/flakeheaven.
The actual cleanup was done with `pycln --all test`.
Also:
- Remove superflous `pass` statements.
|
| |
|
|
|
| |
This is mainly to address issues experienced with flake8 in
https://github.com/RDFLib/rdflib/pull/1944
|
| |
|
|
|
| |
rebased PR #1089 from 2 yrs ago, adding DateTime arithmetic operations for Literals - an extension of https://github.com/RDFLib/rdflib/issues/629, additional tests of numerics added, as requested in https://github.com/RDFLib/rdflib/pull/1089#issuecomment-666163211 and limited modernisation of `test/test_literal/test_literal.py`
Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
|
| |
|
|
| |
for more information, see https://pre-commit.ci
|
| |\
| |
| | |
Add ability to detect and mark ill-typed literals
|
| | | |
|
| | |\ |
|
| | | | |
|
| | |/
|/|
| |
| | |
for more information, see https://pre-commit.ci
|
| | | |
|
| | | |
|
| |/ |
|
| |
|