Skip to content

Commit

Permalink
refractor
Browse files Browse the repository at this point in the history
  • Loading branch information
bitranox committed Sep 20, 2020
1 parent f2cf950 commit 2d61165
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .docs/README_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ igittigitt
==========


Version v2.0.2 as of 2020-09-20 see `Changelog`_
Version v2.0.3a0 as of 2020-09-20 see `Changelog`_


.. include:: ./badges.rst
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ TODO:
- add nested .gitignore files
- documentation

v2.0.3a0
--------
2020-09-20:
- bump up coverage

v2.0.2
--------
2020-09-20:
Expand Down
7 changes: 6 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ igittigitt
==========


Version v2.0.2 as of 2020-09-20 see `Changelog`_
Version v2.0.3a0 as of 2020-09-20 see `Changelog`_

|travis_build| |license| |jupyter| |pypi| |black|

Expand Down Expand Up @@ -374,6 +374,11 @@ TODO:
- add nested .gitignore files
- documentation

v2.0.3a0
--------
2020-09-20:
- bump up coverage

v2.0.2
--------
2020-09-20:
Expand Down
4 changes: 2 additions & 2 deletions igittigitt/__init__conf__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "igittigitt"
title = "A spec-compliant gitignore parser for Python"
version = "v2.0.2"
version = "v2.0.3a0"
url = "https://github.com/bitranox/igittigitt"
author = "Robert Nowotny"
author_email = "[email protected]"
Expand All @@ -15,7 +15,7 @@ def print_info() -> None:
A spec-compliant gitignore parser for Python
Version : v2.0.2
Version : v2.0.3a0
Url : https://github.com/bitranox/igittigitt
Author : Robert Nowotny
Email : [email protected]"""
Expand Down
13 changes: 2 additions & 11 deletions igittigitt/igittigitt.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,21 +160,12 @@ def _parse_rule_file(
were the rule file resides
"""
if isinstance(rule_file, str):
path_rule_file = pathlib.Path(rule_file).resolve()
elif isinstance(rule_file, pathlib.Path):
path_rule_file = rule_file.resolve()
else:
raise TypeError('wrong type for "rule_file"')
path_rule_file = pathlib.Path(rule_file).resolve()

if base_dir is None:
path_base_dir = path_rule_file.parent
elif isinstance(base_dir, str):
path_base_dir = pathlib.Path(base_dir).resolve()
elif isinstance(base_dir, pathlib.Path):
path_base_dir = base_dir.resolve()
else:
raise TypeError('wrong type for "base_dir"')
path_base_dir = pathlib.Path(base_dir).resolve()

with open(path_rule_file) as ignore_file:
counter = 0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_line_data(line: str) -> str:

setup_kwargs: Dict[str, Any] = dict()
setup_kwargs["name"] = "igittigitt"
setup_kwargs["version"] = "v2.0.2"
setup_kwargs["version"] = "v2.0.3a0"
setup_kwargs["url"] = "https://github.com/bitranox/igittigitt"
setup_kwargs["packages"] = find_packages()
setup_kwargs["package_data"] = {"igittigitt": ["py.typed", "*.pyi", "__init__.pyi"]}
Expand Down
1 change: 1 addition & 0 deletions tests/example/.test_gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ test__pycache__
.test_venv/
.test_venv/**
.test_venv/*
!test_inverse

0 comments on commit 2d61165

Please sign in to comment.