Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small refactors to primer #6730

Merged
merged 1 commit into from
May 28, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/primer_run_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,5 @@ jobs:
- name: Upload PR number
uses: actions/upload-artifact@v3
with:
name: primer_pylint_output_workflow
name: pr_number
path: pr_number.txt
5 changes: 4 additions & 1 deletion tests/primer/primer_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import json
from io import StringIO
from pathlib import Path
from typing import Dict, List, Union
jacobtylerwalls marked this conversation as resolved.
Show resolved Hide resolved

import git

Expand All @@ -19,6 +20,8 @@
PRIMER_DIRECTORY = TESTS_DIR / ".pylint_primer_tests/"
PACKAGES_TO_PRIME_PATH = Path(__file__).parent / "packages_to_prime.json"

PackageMessages = Dict[str, List[Dict[str, Union[str, int]]]]


class Primer:
"""Main class to handle priming of packages."""
Expand Down Expand Up @@ -100,7 +103,7 @@ def _handle_prepare_command(self) -> None:
f.write(commit_string)

def _handle_run_command(self) -> None:
packages: dict[str, list[dict[str, str | int]]] = {}
packages: PackageMessages = {}

for package, data in self.packages.items():
output = self._lint_package(data)
Expand Down