Skip to content

Commit

Permalink
Removes now unnecessary include_*=False keywords arguments
Browse files Browse the repository at this point in the history
Explicitly disabling third-programs data sources is not required
since paths are now resolved relatively to `root_dir`.
  • Loading branch information
Samuel FORESTIER authored and HorlogeSkynet committed Apr 20, 2024
1 parent 1cdfc44 commit a46f5a7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
7 changes: 1 addition & 6 deletions src/distro/distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -1478,12 +1478,7 @@ def main() -> None:
args = parser.parse_args()

if args.root_dir:
dist = LinuxDistribution(
include_lsb=False,
include_uname=False,
include_oslevel=False,
root_dir=args.root_dir,
)
dist = LinuxDistribution(root_dir=args.root_dir)
else:
dist = _distro

Expand Down
3 changes: 0 additions & 3 deletions tests/test_distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,6 @@ def setup_method(self, test_method: FunctionType) -> None:
dist = test_method.__name__.split("_")[1]
root_dir = os.path.join(DISTROS_DIR, dist)
self.distro = distro.LinuxDistribution(
include_lsb=False,
include_uname=False,
include_oslevel=False,
os_release_file="",
distro_release_file="path-to-non-existing-file",
root_dir=root_dir,
Expand Down

0 comments on commit a46f5a7

Please sign in to comment.