Skip to content

Commit

Permalink
fixed ruff errors in generated python code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ex-32 committed Jul 24, 2024
1 parent edaf78a commit 311261d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion probe_src/probe_frontend/macros/src/pygen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ impl Display for DataclassProp {
writeln!(
f,
"{indent_str}@property\n\
{indent_str}def {name}() -> {ret}:",
{indent_str}def {name}(self) -> {ret}:",
)?;

for line in &self.body {
Expand Down
2 changes: 1 addition & 1 deletion probe_src/probe_frontend/python/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Path:
dirfd_valid: bool

@property
def dirfd() -> int:
def dirfd(self) -> int:
return self.dirfd_minus_at_fdcwd + AT_FDCWD


Expand Down
4 changes: 2 additions & 2 deletions probe_src/probe_frontend/python/probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def load_log(path: str) -> ProvLog:
tid: int = int(parts[2])

# ensure necessary dict objects have been created
if not pid in op_map:
if pid not in op_map:
op_map[pid] = {}
if not epoch in op_map[pid]:
if epoch not in op_map[pid]:
op_map[pid][epoch] = {}

# extract file contents as byte buffer
Expand Down

0 comments on commit 311261d

Please sign in to comment.