Skip to content

Commit

Permalink
Added missing doc references
Browse files Browse the repository at this point in the history
  • Loading branch information
tahv committed Mar 31, 2024
1 parent 85b2987 commit c31d222
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ mypy: $(venv)
build: $(venv)
$(python) -m build

.PHONY: doc ## Build documentation
doc: $(venv)
$(python) -m sphinx -b html -a docs $(DOCS_BUILDDIR)
.PHONY: docs ## Build documentation
docs: $(venv)
$(python) -m sphinx -W -n -b html -a docs $(DOCS_BUILDDIR)

.PHONY: serve ## Serve documentation at http://127.0.0.1:8000
serve: $(venv)
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Documentation:
https://www.sphinx-doc.org/en/master/usage/configuration.html
"""

import importlib.metadata
import sys
from pathlib import Path
Expand Down
13 changes: 13 additions & 0 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Exceptions
.. autoexception:: pyforce.AuthenticationError
.. autoexception:: pyforce.ConnectionExpiredError
.. autoexception:: pyforce.CommandExecutionError
.. autoexception:: pyforce.ChangeUnknownError

Other
-----
Expand All @@ -119,3 +120,15 @@ Other

.. autoenum:: pyforce.MarshalCode
:members:

.. autoenum:: pyforce.MessageLevel
:members:

.. class:: pyforce.utils.PerforceDateTime

Alias of `datetime.datetime`

.. class:: pyforce.utils.PerforceTimestamp

Alias of `datetime.datetime`

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ Changelog = "https://github.com/tahv/pyforce/blob/main/CHANGELOG.md"
tests = ["pytest", "coverage"]
style = ["ruff"]
mypy = ["mypy", "pytest"]
doc = [
docs = [
"sphinx",
"sphinx-autobuild",
"furo",
"myst-parser",
"autodoc_pydantic",
"enum_tools[sphinx]",
]
dev = ["pyforce-p4[tests,style,mypy,doc]"]
dev = ["pyforce-p4[tests,style,mypy,docs]"]

[tool.hatch.version]
source = "vcs"
Expand Down
4 changes: 2 additions & 2 deletions src/pyforce/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from __future__ import annotations

import pathlib

Check failure on line 5 in src/pyforce/models.py

View workflow job for this annotation

GitHub Actions / Ruff lint

Ruff (TCH003)

src/pyforce/models.py:5:8: TCH003 Move standard library import `pathlib` into a type-checking block
import shlex
from dataclasses import dataclass
from pathlib import Path # noqa: TCH003
from typing import Any, Iterable, List, Literal, Mapping, NamedTuple, Union, cast

from pydantic import (
Expand Down Expand Up @@ -186,7 +186,7 @@ class Client(PyforceModel):
owner: str = Field(alias="Owner")
"""The name of the user who owns the workspace."""

root: Path = Field(alias="Root")
root: pathlib.Path = Field(alias="Root")
"""Workspace root directory on the local host
All the file in `views` are relative to this directory.
Expand Down
1 change: 1 addition & 0 deletions src/pyforce/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class StrEnum(str, Enum):
"Connection",
"MessageSeverity",
"MarshalCode",
"MessageLevel",
]

log: Final = logging.getLogger("pyforce")
Expand Down

0 comments on commit c31d222

Please sign in to comment.