Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions .github/CODESTYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,39 @@ Listed is a example class used demonstrate general rules you should follow throu

```python
class ExampleClass:
"""
ExampleClass
------------
Example class for CODESTYLE.md
"""
# ^^^ reST Docstring Format

_private_attribute : int # private attributes begin with a lowercase
public_attribute : int # type hint for integer is defined here

def __init__(
self,
public_attribute: int # type hint for parameters
) -> None: # the expected return value of method
"""
Initializes a ExampleClass

Parameters
----------
:param public_attribute: example attribute
"""
self.public_attribute = public_attribute
self.private_attribute = square(public_attribute)

def square(self, value: int) -> int:
"""
Example method that square roots a value

Parameters
----------
:param value: value that you want squared
ExampleClass
------------
Example class for CODESTYLE.md
"""
return value**2
# ^^^ reST Docstring Format

_private_attribute : int # private attributes begin with a lowercase
public_attribute : int # type hint for integer is defined here

def __init__(
self,
public_attribute: int # type hint for parameters
) -> None: # the expected return value of method
"""
Initializes a ExampleClass

Parameters
----------
:param public_attribute: example attribute
"""
self.public_attribute = public_attribute
self.private_attribute = square(public_attribute)

def square(self, value: int) -> int:
"""
Example method that square roots a value

Parameters
----------
:param value: value that you want squared
"""
return value**2
```


Expand Down Expand Up @@ -87,7 +87,7 @@ Currently, documentation for this project resides in markdown files.
- Use of HTML is permitted
- [reference style links](https://www.markdownguide.org/basic-syntax/#reference-style-links) are not required by are appreciated
- Exceedingly long lines are to be broken
- The indents are to be two spaces
- The indents are to be 4 spaces

```markdown
<!--example markdown document-->
Expand Down
2 changes: 0 additions & 2 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
indent-width = 2

[format]
# Exclude commonly ignored directories.
exclude = [
Expand Down
16 changes: 8 additions & 8 deletions src/thread/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@

# Wildcard Export
__all__ = [
'Thread',
'ParallelProcessing',
'threaded',
'processor',
'types',
'exceptions',
'Settings',
'__version__',
'Thread',
'ParallelProcessing',
'threaded',
'processor',
'types',
'exceptions',
'Settings',
'__version__',
]
2 changes: 1 addition & 1 deletion src/thread/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from .cli import app

if __name__ == '__main__':
app(prog_name='thread')
app(prog_name='thread')
14 changes: 7 additions & 7 deletions src/thread/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

# Variable Types
ThreadStatus = Literal[
'Idle',
'Running',
'Invoking hooks',
'Completed',
'Errored',
'Kill Scheduled',
'Killed',
'Idle',
'Running',
'Invoking hooks',
'Completed',
'Errored',
'Kill Scheduled',
'Killed',
]


Expand Down
12 changes: 6 additions & 6 deletions src/thread/cli.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
try:
import importlib
import importlib

thread_cli = importlib.import_module('thread-cli')
app = thread_cli.app
thread_cli = importlib.import_module('thread-cli')
app = thread_cli.app
except ModuleNotFoundError:

def app(prog_name='thread'):
print('thread-cli not found, please install it with `pip install thread-cli`')
exit(1)
def app(prog_name='thread'):
print('thread-cli not found, please install it with `pip install thread-cli`')
exit(1)
Loading