We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
create config aliases for pre-hook and post-hook
## Feature

### Feature description
Pre-hooks and post-hooks can be specified in a `config()` block, but they require the use of a dictionary instead of a list of keyword arguments. Instead, dbt should support the specification of these hooks using `pre_hook` and `post_hook` aliases.

Before:
```
{{
  config({
    "post-hook" : "grant select on {{ this }} to db_reader"
  })
}}
```

After:
```
{{
  config(
    post_hook="grant select on {{ this }} to db_reader"
  )
}}
```


### Who will this benefit?
This will be a quality of life improvement for many dbt users :)

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dbt/context/parser.py`
Content:
```
1 import dbt.exceptions
2 
3 import dbt.context.common
4 
5 
6 execute = False
7 
8 
9 def ref(db_wrapper, model, config, manifest):
10 
11     def ref(*args):
12         if len(args) == 1 or len(args) == 2:
13             model.refs.append(list(args))
14 
15         else:
16             dbt.exceptions.ref_invalid_args(model, args)
17 
18         return db_wrapper.adapter.Relation.create_from_node(config, model)
19 
20     return ref
21 
22 
23 def docs(unparsed, docrefs, column_name=None):
24 
25     def do_docs(*args):
26         if len(args) != 1 and len(args) != 2:
27             dbt.exceptions.doc_invalid_args(unparsed, args)
28         doc_package_name = ''
29         doc_name = args[0]
30         if len(args) == 2:
31             doc_package_name = args[1]
32 
33         docref = {
34             'documentation_package': doc_package_name,
35             'documentation_name': doc_name,
36         }
37         if column_name is not None:
38             docref['column_name'] = column_name
39 
40         docrefs.append(docref)
41 
42         # IDK
43         return True
44 
45     return do_docs
46 
47 
48 class Config:
49     def __init__(self, model, source_config):
50         self.model = model
51         self.source_config = source_config
52 
53     def __call__(self, *args, **kwargs):
54         if len(args) == 1 and len(kwargs) == 0:
55             opts = args[0]
56         elif len(args) == 0 and len(kwargs) > 0:
57             opts = kwargs
58         else:
59             dbt.exceptions.raise_compiler_error(
60                 "Invalid inline model config",
61                 self.model)
62 
63         self.source_config.update_in_model_config(opts)
64         return ''
65 
66     def set(self, name, value):
67         return self.__call__({name: value})
68 
69     def require(self, name, validator=None):
70         return ''
71 
72     def get(self, name, validator=None, default=None):
73         return ''
74 
75 
76 def generate(model, runtime_config, manifest, source_config):
77     return dbt.context.common.generate(
78         model, runtime_config, manifest, source_config, dbt.context.parser)
79
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/dbt/context/parser.py b/dbt/context/parser.py
--- a/dbt/context/parser.py
+++ b/dbt/context/parser.py
@@ -50,6 +50,19 @@
         self.model = model
         self.source_config = source_config
 
+    def _transform_config(self, config):
+        for oldkey in ('pre_hook', 'post_hook'):
+            if oldkey in config:
+                newkey = oldkey.replace('_', '-')
+                if newkey in config:
+                    dbt.exceptions.raise_compiler_error(
+                        'Invalid config, has conflicting keys "{}" and "{}"'
+                        .format(oldkey, newkey),
+                        self.model
+                    )
+                config[newkey] = config.pop(oldkey)
+        return config
+
     def __call__(self, *args, **kwargs):
         if len(args) == 1 and len(kwargs) == 0:
             opts = args[0]
@@ -60,6 +73,8 @@
                 "Invalid inline model config",
                 self.model)
 
+        opts = self._transform_config(opts)
+
         self.source_config.update_in_model_config(opts)
         return ''

{"golden_diff": "diff --git a/dbt/context/parser.py b/dbt/context/parser.py\n--- a/dbt/context/parser.py\n+++ b/dbt/context/parser.py\n@@ -50,6 +50,19 @@\n         self.model = model\n         self.source_config = source_config\n \n+    def _transform_config(self, config):\n+        for oldkey in ('pre_hook', 'post_hook'):\n+            if oldkey in config:\n+                newkey = oldkey.replace('_', '-')\n+                if newkey in config:\n+                    dbt.exceptions.raise_compiler_error(\n+                        'Invalid config, has conflicting keys \"{}\" and \"{}\"'\n+                        .format(oldkey, newkey),\n+                        self.model\n+                    )\n+                config[newkey] = config.pop(oldkey)\n+        return config\n+\n     def __call__(self, *args, **kwargs):\n         if len(args) == 1 and len(kwargs) == 0:\n             opts = args[0]\n@@ -60,6 +73,8 @@\n                 \"Invalid inline model config\",\n                 self.model)\n \n+        opts = self._transform_config(opts)\n+\n         self.source_config.update_in_model_config(opts)\n         return ''\n", "issue": "create config aliases for pre-hook and post-hook\n## Feature\r\n\r\n### Feature description\r\nPre-hooks and post-hooks can be specified in a `config()` block, but they require the use of a dictionary instead of a list of keyword arguments. Instead, dbt should support the specification of these hooks using `pre_hook` and `post_hook` aliases.\r\n\r\nBefore:\r\n```\r\n{{\r\n  config({\r\n    \"post-hook\" : \"grant select on {{ this }} to db_reader\"\r\n  })\r\n}}\r\n```\r\n\r\nAfter:\r\n```\r\n{{\r\n  config(\r\n    post_hook=\"grant select on {{ this }} to db_reader\"\r\n  )\r\n}}\r\n```\r\n\r\n\r\n### Who will this benefit?\r\nThis will be a quality of life improvement for many dbt users :)\n", "before_files": [{"content": "import dbt.exceptions\n\nimport dbt.context.common\n\n\nexecute = False\n\n\ndef ref(db_wrapper, model, config, manifest):\n\n    def ref(*args):\n        if len(args) == 1 or len(args) == 2:\n            model.refs.append(list(args))\n\n        else:\n            dbt.exceptions.ref_invalid_args(model, args)\n\n        return db_wrapper.adapter.Relation.create_from_node(config, model)\n\n    return ref\n\n\ndef docs(unparsed, docrefs, column_name=None):\n\n    def do_docs(*args):\n        if len(args) != 1 and len(args) != 2:\n            dbt.exceptions.doc_invalid_args(unparsed, args)\n        doc_package_name = ''\n        doc_name = args[0]\n        if len(args) == 2:\n            doc_package_name = args[1]\n\n        docref = {\n            'documentation_package': doc_package_name,\n            'documentation_name': doc_name,\n        }\n        if column_name is not None:\n            docref['column_name'] = column_name\n\n        docrefs.append(docref)\n\n        # IDK\n        return True\n\n    return do_docs\n\n\nclass Config:\n    def __init__(self, model, source_config):\n        self.model = model\n        self.source_config = source_config\n\n    def __call__(self, *args, **kwargs):\n        if len(args) == 1 and len(kwargs) == 0:\n            opts = args[0]\n        elif len(args) == 0 and len(kwargs) > 0:\n            opts = kwargs\n        else:\n            dbt.exceptions.raise_compiler_error(\n                \"Invalid inline model config\",\n                self.model)\n\n        self.source_config.update_in_model_config(opts)\n        return ''\n\n    def set(self, name, value):\n        return self.__call__({name: value})\n\n    def require(self, name, validator=None):\n        return ''\n\n    def get(self, name, validator=None, default=None):\n        return ''\n\n\ndef generate(model, runtime_config, manifest, source_config):\n    return dbt.context.common.generate(\n        model, runtime_config, manifest, source_config, dbt.context.parser)\n", "path": "dbt/context/parser.py"}], "after_files": [{"content": "import dbt.exceptions\n\nimport dbt.context.common\n\n\nexecute = False\n\n\ndef ref(db_wrapper, model, config, manifest):\n\n    def ref(*args):\n        if len(args) == 1 or len(args) == 2:\n            model.refs.append(list(args))\n\n        else:\n            dbt.exceptions.ref_invalid_args(model, args)\n\n        return db_wrapper.adapter.Relation.create_from_node(config, model)\n\n    return ref\n\n\ndef docs(unparsed, docrefs, column_name=None):\n\n    def do_docs(*args):\n        if len(args) != 1 and len(args) != 2:\n            dbt.exceptions.doc_invalid_args(unparsed, args)\n        doc_package_name = ''\n        doc_name = args[0]\n        if len(args) == 2:\n            doc_package_name = args[1]\n\n        docref = {\n            'documentation_package': doc_package_name,\n            'documentation_name': doc_name,\n        }\n        if column_name is not None:\n            docref['column_name'] = column_name\n\n        docrefs.append(docref)\n\n        # IDK\n        return True\n\n    return do_docs\n\n\nclass Config:\n    def __init__(self, model, source_config):\n        self.model = model\n        self.source_config = source_config\n\n    def _transform_config(self, config):\n        for oldkey in ('pre_hook', 'post_hook'):\n            if oldkey in config:\n                newkey = oldkey.replace('_', '-')\n                if newkey in config:\n                    dbt.exceptions.raise_compiler_error(\n                        'Invalid config, has conflicting keys \"{}\" and \"{}\"'\n                        .format(oldkey, newkey),\n                        self.model\n                    )\n                config[newkey] = config.pop(oldkey)\n        return config\n\n    def __call__(self, *args, **kwargs):\n        if len(args) == 1 and len(kwargs) == 0:\n            opts = args[0]\n        elif len(args) == 0 and len(kwargs) > 0:\n            opts = kwargs\n        else:\n            dbt.exceptions.raise_compiler_error(\n                \"Invalid inline model config\",\n                self.model)\n\n        opts = self._transform_config(opts)\n\n        self.source_config.update_in_model_config(opts)\n        return ''\n\n    def set(self, name, value):\n        return self.__call__({name: value})\n\n    def require(self, name, validator=None):\n        return ''\n\n    def get(self, name, validator=None, default=None):\n        return ''\n\n\ndef generate(model, runtime_config, manifest, source_config):\n    return dbt.context.common.generate(\n        model, runtime_config, manifest, source_config, dbt.context.parser)\n", "path": "dbt/context/parser.py"}]}