File tree 2 files changed +16
-0
lines changed 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -753,12 +753,16 @@ def validate_deprecated_implicit_keys(self):
753
753
"""
754
754
Check for deprecated usages and raise an exception if found.
755
755
756
+ - If the user is using build.commands, we don't need the sphinx or mkdocs keys.
756
757
- If the sphinx key is used, a path to the configuration file is required.
757
758
- If the mkdocs key is used, a path to the configuration file is required.
758
759
- If none of the sphinx or mkdocs keys are used,
759
760
and the user isn't overriding the new build jobs,
760
761
the sphinx key is explicitly required.
761
762
"""
763
+ if self .is_using_build_commands :
764
+ return
765
+
762
766
has_sphinx_key = "sphinx" in self .source_config
763
767
has_mkdocs_key = "mkdocs" in self .source_config
764
768
if has_sphinx_key and not self .sphinx .configuration :
Original file line number Diff line number Diff line change @@ -1864,6 +1864,18 @@ def test_config_without_sphinx_key(self):
1864
1864
data_copy ["build" ]["jobs" ]["build" ] = {"html" : ["echo 'Hello World'" ]}
1865
1865
get_build_config (data_copy , validate = True , deprecate_implicit_keys = True )
1866
1866
1867
+ def test_sphinx_and_mkdocs_arent_required_when_using_build_commands (self ):
1868
+ data = {
1869
+ "build" : {
1870
+ "os" : "ubuntu-22.04" ,
1871
+ "tools" : {
1872
+ "python" : "3" ,
1873
+ },
1874
+ "commands" : ["echo 'Hello World'" ],
1875
+ },
1876
+ }
1877
+ get_build_config (data , validate = True , deprecate_implicit_keys = True )
1878
+
1867
1879
def test_as_dict_new_build_config (self , tmpdir ):
1868
1880
build = get_build_config (
1869
1881
{
You can’t perform that action at this time.
0 commit comments