Skip to content

Commit

Permalink
Remove unnecessary context section, from code and the docs (#1905)
Browse files Browse the repository at this point in the history
Now it uses its config directly without subsections.
  • Loading branch information
jacopofar committed Nov 15, 2021
1 parent fe71f79 commit 66a8660
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/source/configuration.rst
Expand Up @@ -181,7 +181,7 @@ these can be configured by setting param_style to the names above

.. code-block:: cfg
[sqlfluff:templater:placeholder:context]
[sqlfluff:templater:placeholder]
param_style=colon
my_name='john'
Expand Down
3 changes: 1 addition & 2 deletions src/sqlfluff/core/templaters/placeholder.py
Expand Up @@ -65,8 +65,7 @@ def get_context(self, config) -> Dict:
if config:
# This is now a nested section
loaded_context = (
config.get_section((self.templater_selector, self.name, "context"))
or {}
config.get_section((self.templater_selector, self.name)) or {}
)
else:
loaded_context = {}
Expand Down

0 comments on commit 66a8660

Please sign in to comment.