Skip to content

Commit b54ad5b

Browse files
author
Synaptics GitLab CI
committed
Documentation version 0.6.0
1 parent a0b7d8c commit b54ad5b

38 files changed

+973
-332
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ DL-7450 SDK Documentation
44
Building the documentation locally
55
----------------------------------
66

7-
If you're making changes to the documentation, you may want to build the
7+
If you are making changes to the documentation, you may want to build the
88
documentation locally so that you can preview your changes.
99

1010
Install Sphinx, and optionally (for the RTD-styling), sphinx_rtd_theme.

docs/conf.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
# All configuration values have a default; values that are commented out
1414
# serve to show the default.
1515

16-
import sys
1716
import os
17+
import sys
18+
from datetime import datetime
1819

1920
# If extensions (or modules to document with autodoc) are in another directory,
2021
# add these directories to sys.path here. If the directory is relative to the
@@ -66,7 +67,7 @@
6667

6768
# General information about the project.
6869
project = "DisplayLink DL-7450 SDK"
69-
copyright = "- The DisplayLink DL-7450 SDK Documentation is Copyright © 2024 Synaptics Inc."
70+
copyright = f"- The DisplayLink DL-7450 SDK Documentation is Copyright © 2024-{datetime.now().year} Synaptics Inc."
7071
version = release = dl7450_version
7172

7273
exclude_patterns = ["build", ".venv", "venv"]
@@ -180,9 +181,6 @@
180181
# Output file base name for HTML help builder.
181182
htmlhelp_basename = "DL7450doc"
182183

183-
# Example configuration for intersphinx: refer to the Python standard library.
184-
intersphinx_mapping = {"python": ("https://docs.python.org/3.5", None)}
185-
186184
# External weblinks
187185
extlinks = {
188186
"githubSamples": ('https://github.com/DisplayLink/dl-7450/tree/main/%s', None)

docs/library/builtins.rst

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
All builtin functions and exceptions are described here. They are also
55
available via ``builtins`` module.
66

7+
Constants
8+
---------
9+
10+
.. data:: True
11+
12+
.. data:: False
13+
14+
.. data:: None
15+
16+
.. data:: NotImplemented
17+
718
Functions and types
819
-------------------
920

@@ -33,8 +44,8 @@ Functions and types
3344

3445
.. function:: delattr(obj, name)
3546

36-
The argument *name* should be a string, and this function deletes the named
37-
attribute from the object given by *obj*.
47+
The argument *name* should be a string, and this function deletes the named
48+
attribute from the object given by *obj*.
3849

3950
.. class:: dict()
4051

@@ -70,15 +81,15 @@ Functions and types
7081

7182
.. class:: int()
7283

73-
.. classmethod:: from_bytes(bytes, byteorder)
84+
.. classmethod:: from_bytes(bytes, byteorder)
7485

75-
The *byteorder* parameter must be positional (this is
76-
compatible with CPython).
86+
The *byteorder* parameter must be positional (this is
87+
compatible with CPython).
7788

78-
.. method:: to_bytes(size, byteorder)
89+
.. method:: to_bytes(size, byteorder)
7990

80-
The *byteorder* parameter must be positional (this is
81-
compatible with CPython).
91+
The *byteorder* parameter must be positional (this is
92+
compatible with CPython).
8293

8394
.. function:: isinstance()
8495

@@ -130,7 +141,7 @@ Functions and types
130141

131142
.. class:: slice()
132143

133-
The *slice* builtin is the type that slice objects have.
144+
The *slice* builtin is the type that slice objects have.
134145

135146
.. function:: sorted()
136147

docs/library/datetime.date.rst

Lines changed: 65 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,78 +4,122 @@
44
class date -- Represent a date
55
===============================
66

7+
A representation of a date, according to the Gregorian calendar.
8+
79
:py:class:`~datetime.date` objects support equality and comparison operators.
810

911
.. class:: date(year, month, day)
1012

11-
All arguments are required. Arguments must be integers, in the following ranges:
13+
Construct a date object representing the given ``year``, ``month`` and ``day``.
1214

13-
- :py:class:`~datetime.MINYEAR` <= year <= :py:class:`~datetime.MAXYEAR`
14-
- 1 <= month <= 12
15-
- 1 <= day <= number of days in the given month and year
15+
Arguments must be integers in the following ranges:
1616

17-
Other constructors:
17+
- :py:class:`~datetime.MINYEAR` <= ``year`` <= :py:class:`~datetime.MAXYEAR`
18+
- ``1`` <= ``month`` <= ``12``
19+
- ``1`` <= ``day`` <= number of days in the given month and year
1820

1921
.. classmethod:: today()
2022

23+
Construct a date object representing today's year, month and day.
24+
2125
.. classmethod:: fromtimestamp(timestamp)
2226

27+
Construct a date object representing the year, month and day specified by the
28+
provided ``timestamp``.
29+
30+
A ``timestamp`` in this case is a floating point number representing the
31+
number of seconds since the epoch (January 1, 1970, 00:00:00 UTC).
32+
2333
.. classmethod:: fromordinal(ordinal)
2434

25-
.. classmethod:: fromisoformate(date_string)
35+
Construct a date object representing the year, month and day specified by the
36+
provided ``ordinal``.
37+
38+
An ``ordinal`` is an integer representing the number of days since January
39+
1st of year 1.
40+
41+
.. classmethod:: fromisoformat(date_string)
42+
43+
Construct a date object from a string in
44+
`ISO 8601 format <https://www.iso.org/iso-8601-date-and-time-format.html>`_::
45+
46+
from datetime import date
47+
d = date.fromisoformat('2012-12-21')
2648

27-
Class attributes:
28-
2949
.. attribute:: min
3050

31-
The earliest representable date, date(:py:attr:`~datetime.MINYEAR`, 1, 1).
51+
The earliest representable date, ``date(datetime.MINYEAR, 1, 1)``.
3252

3353
.. attribute:: max
3454

35-
The latest representable date, date(:py:attr:`~datetime.MAXYEAR`, 12, 31).
55+
The latest representable date, ``date(datetime.MAXYEAR, 12, 31)``.
3656

3757
.. attribute:: resolution
3858

39-
The smallest possible difference between non-equal date objects, ``timedelta(days=1)`` .
40-
41-
Instance attributes:
59+
The smallest possible difference between non-equal date objects,
60+
``timedelta(days=1)``.
4261

4362
.. attribute:: year
4463

64+
The year of the date, an integer in the range :py:class:`~datetime.MINYEAR`
65+
to :py:class:`~datetime.MAXYEAR`.
66+
4567
.. attribute:: month
4668

69+
The month of the date, an integer in the range ``1`` to ``12``.
70+
4771
.. attribute:: day
4872

49-
Instance methods
73+
The day of the date, an integer in the range ``1`` to the number of days
74+
in the month represented by :py:attr:`month`.
5075

5176
.. method:: replace(year = self.year, month = self.month, day = self.day)
5277

53-
Return a new :py:class:`~datetime.date` object with the same values but the specified parameters updated.
78+
Return a new :py:class:`~datetime.date` object with the same values as the
79+
existing date object, but with the specified parameters updated.
5480

5581
.. method:: tuple()
5682

57-
Return the date as a tuple (year, month, day)
83+
Return the date as a 3-tuple ``(year, month, day)``.
5884

5985
.. method:: timetuple()
6086

6187
Return the date as a 9-tuple
88+
``(year, month, day, hour, minute, second, weekday, yearday, dst)``, as
89+
described in :py:meth:`datetime.datetime.timetuple`.
90+
91+
In this case:
92+
93+
* ``hour``, ``minute`` and ``second`` are all ``0``, as the date object does
94+
not contain time information.
95+
* ``weekday`` is the day of the week as an integer, where Monday is ``0`` and
96+
Sunday is ``6``.
97+
* ``yearday`` is the day of the year as an integer, where January 1st is
98+
``1``.
99+
* ``dst`` is ``-1``, as the date object does not contain daylight savings
100+
information.
62101

63102
.. method:: toordinal()
64-
65-
Return an integer representing the ordinal of the date, where January 1st of year 1 has ordinal 1.
103+
104+
Return an integer representing the ordinal of the date, where January 1st
105+
of year 1 has ordinal ``1``.
66106

67107
.. method:: isoformat()
68108

69-
Return a string representing the date in ISO 8601 format, YYYY-MM-DD::
109+
Return a string representing the date in
110+
`ISO 8601 format <https://www.iso.org/iso-8601-date-and-time-format.html>`_,
111+
``YYYY-MM-DD``::
70112

71113
from datetime import date
72114
date(2002, 12, 4).isoformat()
73115
# outputs '2002-12-04'
74116

75117
.. method:: isoweekday()
76118

77-
Return the day of the week as an integer, where Monday is 1 and Sunday is 7.
119+
Return the day of the week as an integer, where Monday is ``1`` and Sunday is
120+
``7``.
78121

79122
.. method:: weekday()
80123

81-
Return the day of the week as an integer, where Monday is 0 and Sunday is 6.
124+
Return the day of the week as an integer, where Monday is ``0`` and Sunday is
125+
``6``.

0 commit comments

Comments
 (0)