fix some bugs

This commit is contained in:
Maximilian Keßler 2021-10-22 13:51:31 +02:00
parent 96f2608751
commit f0c32260fa
2 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@ class TexFileToFormat:
self.overwrite_existing_files: overwrite_existing_files
self.build_all = build_all
self.dirty = is_recent(self.src_path, self.current_build_info.package_repo, compare=None)
self.dirty = not is_recent(self.src_path, self.current_build_info.package_repo, compare=None)
self.pytex_dirty: bool = self.current_build_info.pytex_repo.is_dirty(
working_tree=True,
untracked_files=True
@ -70,7 +70,7 @@ class TexFileToFormat:
elif not self.pytex_recent or not self.recent:
return self.__format() # Build file since either pytex or package repo is not recent
else:
pass # Do not build
return self.last_build_info
def __format(self) -> dict:
if '.pysty' in self.src_path.name:

View file

@ -37,6 +37,6 @@ def is_recent(file: Path, repo: git.Repo, compare: Optional[Union[git.Commit, Li
return None
if str(file.relative_to(repo.working_dir)) in newly_committed_files:
return True
else:
return False
else:
return True