fix: fixed formatting
This commit is contained in:
2 files changed
+28
-23
No files matched your search
+25
-22
@@ -90,12 +90,14 @@ Modus/
|
|||||||
## Development Workflow
|
## Development Workflow
|
||||||
|
|
||||||
1. **Create a branch** from `dev`:
|
1. **Create a branch** from `dev`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git checkout dev
|
git checkout dev
|
||||||
git checkout -b feat/my-feature
|
git checkout -b feat/my-feature
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Make your changes** and ensure they pass linting:
|
2. **Make your changes** and ensure they pass linting:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Lint
|
# Lint
|
||||||
.venv/bin/ruff check
|
.venv/bin/ruff check
|
||||||
@@ -111,6 +113,7 @@ Modus/
|
|||||||
```
|
```
|
||||||
|
|
||||||
3. **Test your changes** by running the app:
|
3. **Test your changes** by running the app:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run start
|
uv run start
|
||||||
```
|
```
|
||||||
@@ -133,18 +136,18 @@ Modus uses [Ruff](https://docs.astral.sh/ruff/) for both linting and formatting.
|
|||||||
|
|
||||||
### Enforced via Ruff
|
### Enforced via Ruff
|
||||||
|
|
||||||
| Rule | What it catches |
|
| Rule | What it catches |
|
||||||
|------|----------------|
|
| -------- | ------------------------------------------ |
|
||||||
| `E`, `W` | Pycodestyle style errors |
|
| `E`, `W` | Pycodestyle style errors |
|
||||||
| `F` | Pyflakes (unused imports, undefined names) |
|
| `F` | Pyflakes (unused imports, undefined names) |
|
||||||
| `I` | Import sorting (isort) |
|
| `I` | Import sorting (isort) |
|
||||||
| `UP` | Python upgrade suggestions |
|
| `UP` | Python upgrade suggestions |
|
||||||
| `B` | Bugbear (common bugs) |
|
| `B` | Bugbear (common bugs) |
|
||||||
| `SIM` | Simplification suggestions |
|
| `SIM` | Simplification suggestions |
|
||||||
| `C4` | Unnecessary comprehensions |
|
| `C4` | Unnecessary comprehensions |
|
||||||
| `RET` | Return statement issues |
|
| `RET` | Return statement issues |
|
||||||
| `RUF` | Ruff-specific rules |
|
| `RUF` | Ruff-specific rules |
|
||||||
| `T20` | `print()` detection |
|
| `T20` | `print()` detection |
|
||||||
|
|
||||||
### Running Ruff
|
### Running Ruff
|
||||||
|
|
||||||
@@ -175,16 +178,16 @@ Follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|||||||
|
|
||||||
### Types
|
### Types
|
||||||
|
|
||||||
| Type | Use for |
|
| Type | Use for |
|
||||||
|------|---------|
|
| ---------- | ------------------------------------------------ |
|
||||||
| `feat` | New feature |
|
| `feat` | New feature |
|
||||||
| `fix` | Bug fix |
|
| `fix` | Bug fix |
|
||||||
| `refactor` | Code restructuring without behavior change |
|
| `refactor` | Code restructuring without behavior change |
|
||||||
| `perf` | Performance improvement |
|
| `perf` | Performance improvement |
|
||||||
| `docs` | Documentation changes |
|
| `docs` | Documentation changes |
|
||||||
| `style` | Code style changes (formatting, no logic change) |
|
| `style` | Code style changes (formatting, no logic change) |
|
||||||
| `chore` | Build, CI, tooling, dependencies |
|
| `chore` | Build, CI, tooling, dependencies |
|
||||||
| `test` | Adding or updating tests |
|
| `test` | Adding or updating tests |
|
||||||
|
|
||||||
### Scopes
|
### Scopes
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -258,7 +258,9 @@ class LockScreen(Window):
|
|||||||
return False # stop timeout
|
return False # stop timeout
|
||||||
|
|
||||||
def on_activate(self, entry: Entry, *args):
|
def on_activate(self, entry: Entry, *args):
|
||||||
if not pam.pam().authenticate(getpass.getuser(), (entry.get_text() or "").strip()):
|
if not pam.pam().authenticate(
|
||||||
|
getpass.getuser(), (entry.get_text() or "").strip()
|
||||||
|
):
|
||||||
entry.set_text("")
|
entry.set_text("")
|
||||||
entry.set_placeholder_text("Wrong Password")
|
entry.set_placeholder_text("Wrong Password")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in new issue
Block a user