-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #699 from binpash/future-formatter
Add black formatter to future branch
- Loading branch information
Showing
46 changed files
with
2,537 additions
and
1,326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: psf/black@stable | ||
with: | ||
options: "--extend-exclude 'evaluations/'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
from util import log | ||
from definitions.ir.resource import FileResource, Resource, FileDescriptorResource | ||
from pash_annotations.datatypes.BasicDatatypesWithIO import FileNameWithIOInfo, StdDescriptorWithIOInfo | ||
from pash_annotations.datatypes.BasicDatatypesWithIO import ( | ||
FileNameWithIOInfo, | ||
StdDescriptorWithIOInfo, | ||
) | ||
|
||
|
||
def resource_from_file_descriptor(file_descriptor) -> Resource: | ||
if isinstance(file_descriptor, FileNameWithIOInfo): | ||
arg = file_descriptor.get_name() | ||
log(f'filedes name: {file_descriptor.get_name()}') | ||
log(f'filedes name type: {type(file_descriptor.get_name())}') | ||
log(f'arg: {arg}') | ||
log(f"filedes name: {file_descriptor.get_name()}") | ||
log(f"filedes name type: {type(file_descriptor.get_name())}") | ||
log(f"arg: {arg}") | ||
return FileResource(file_descriptor.get_name()) | ||
elif isinstance(file_descriptor, StdDescriptorWithIOInfo): | ||
resource = ("fd", file_descriptor.get_type().value) | ||
return FileDescriptorResource(resource) | ||
else: | ||
assert(False) | ||
assert False | ||
# unreachable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.