File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /* Source: https://github.com/readthedocs/sphinx_rtd_theme/issues/1529#issuecomment-1918561608*/
2+
3+ /* Take out pointless vertical whitespace in the signatures. */
4+ .rst-content dl .sig dl ,
5+ .rst-content dl .sig dd {
6+ margin-bottom : 0 ;
7+ }
8+
9+ /* Make signature boxes full-width, with view-source and header links right-aligned. */
10+ .rst-content dl .sig {
11+ width : -webkit-fill-available;
12+ }
13+ .rst-content .viewcode-link {
14+ display : inline-flex;
15+ float : inline-end;
16+ margin-right : 1.5em ;
17+ }
18+ .rst-content .headerlink {
19+ position : absolute;
20+ right : 0.5em ;
21+ }
Original file line number Diff line number Diff line change 2323
2424# If your documentation needs a minimal Sphinx version, state it here.
2525#
26- # needs_sphinx = '1.0'
26+ needs_sphinx = "7.2"
2727
2828# Add any Sphinx extension module names here, as strings. They can be
2929# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
9393# Add any paths that contain custom _static files (such as style sheets) here,
9494# relative to this directory. They are copied after the builtin _static files,
9595# so a file named "default.css" will overwrite the builtin "default.css".
96- html_static_path = []
96+ html_static_path = ["_static" ]
97+ html_css_files = ["css/custom.css" ]
9798
9899# Custom sidebar templates, must be a dictionary that maps document names
99100# to template names.
159160 "Miscellaneous" ,
160161 )
161162]
163+
164+ python_maximum_signature_line_length = 80
165+
166+ # Patch Sphinx to hide @overload signatures in docs
167+ # Sphinx's autodoc uses ModuleAnalyzer.overloads via the parser
168+ # We patch the analyze method to clear overloads after parsing
169+ # To see why, check out https://github.com/cognitedata/cognite-sdk-python/pull/2460
170+ from sphinx .pycode import ModuleAnalyzer # noqa: E402
171+
172+ analyze_fn = ModuleAnalyzer .analyze
173+
174+
175+ def analyze_but_skip_overloads (self ):
176+ result = analyze_fn (self )
177+ self .overloads = {} # Clear overloads after analysis
178+ return result
179+
180+
181+ ModuleAnalyzer .analyze = analyze_but_skip_overloads
You can’t perform that action at this time.
0 commit comments