Skip to content

Commit

Permalink
fix from pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pa1ch committed Jan 15, 2025
1 parent e75ed5c commit 339e806
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ docker/*local*
# Jest test report
test-report.html

architecture-as-code/node_modules
architecture-as-code/node_modules
2 changes: 1 addition & 1 deletion architecture-as-code/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ The word “component” is a hugely overloaded term in the software development
With the C4 model, components are not separately deployable units. Instead, it’s the container that’s the deployable unit. In other words, all components inside a container execute in the same process space. Aspects such as how components are packaged (e.g. one component vs many components per JAR file, DLL, shared library, etc) is an orthogonal concern.

#### [Code](https://c4model.com/abstractions/code)
Finally, components are made up of one or more code elements constructed with the basic building blocks of the programming language that you’re using - classes, interfaces, enums, functions, objects, etc.
Finally, components are made up of one or more code elements constructed with the basic building blocks of the programming language that you’re using - classes, interfaces, enums, functions, objects, etc.
2 changes: 1 addition & 1 deletion architecture-as-code/diagrams/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
"name": "User"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ else (no)
:Reject Order;
endif
stop
@enduml
@enduml
2 changes: 1 addition & 1 deletion architecture-as-code/diagrams/examples/code-diagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ Order "1" --> PaymentService : initiates
PaymentService --> PaymentGateway : calls
OrderItem --> SupplierService : "requests"
SupplierService --> SupplierSystem : notifies
@enduml
@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Rel(orderRepository, database, "Reads/Writes order data", $tags="sync")
Rel(productRepository, database, "Reads/Writes product data", $tags="sync")
Rel(orderService, paymentGateway, "Processes payments through", $tags="sync")

@enduml
@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Rel_L(api, database, "Reads and writes order details", $tags="sync")
Rel_D(api, paymentGateway, "Processes payments", $tags="sync")
Rel_D(api, supplierSystem, "Sends order information", $tags="sync")

@enduml
@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Rel_D(customer, CRMSystem, "Places and tracks orders", $tags="sync")
Rel_R(CRMSystem, paymentGateway, "Processes payment", $tags="sync")
Rel_D(CRMSystem, supplierSystem, "Sends order details", $tags="sync")

@enduml
@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ entity "Product" {
Customer ||--o{ Order : "places"
Order ||--o{ OrderItem : "contains"
Product ||--o{ OrderItem : "includes"
@enduml
@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ OrderService -> SupplierService : Notify supplier of order
' Step 8: Supplier Service sends order to external Supplier System
SupplierService -> SupplierSystem : Place supplier order

@enduml
@enduml
2 changes: 1 addition & 1 deletion architecture-as-code/diagrams/examples/state-diagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Placed --> Processed : payment done
Processed --> Shipped : order packed
Shipped --> Delivered : order delivered
[*] --> Cancelled : order canceled
@enduml
@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ usecase "Place Order" as UC1
usecase "Manage Products" as UC2
Customer --> UC1
Admin --> UC2
@enduml
@enduml
2 changes: 1 addition & 1 deletion architecture-as-code/diagrams/global__context-diagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ System_Ext(dodo_auth__ext_sys, "DODO Auth", "Сервис для авториз
Rel_R(user__person, superset__sys, "Изучает дашборды используя")
Rel_D(superset__sys, dodo_auth__ext_sys, "Авторизирует пользователей используя")

@enduml
@enduml
26 changes: 13 additions & 13 deletions architecture-as-code/diagrams/lib/C4.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
' ENABLE_ALL_PLANT_ELEMENTS
' If ENABLE_ALL_PLANT_ELEMENTS is set BEFORE the first C4_* file is loaded, nearly "all" PlantUML elements can be used like
' Component(StorageA, "Storage A ", $baseShape="storage")
' ENABLE_ALL_PLANT_ELEMENTS can be set via
' ENABLE_ALL_PLANT_ELEMENTS can be set via
' !ENABLE_ALL_PLANT_ELEMENTS = 1
' or with additional command line argument -DENABLE_ALL_PLANT_ELEMENTS=1

Expand Down Expand Up @@ -278,7 +278,7 @@ skinparam package {
!return $stereos
!endfunction

' if $sprite/$techn is an empty argument, try to calculate it via the defined $tag
' if $sprite/$techn is an empty argument, try to calculate it via the defined $tag
!unquoted function $toRelArg($arg, $tags, $varPostfix)
!if ($arg > "")
!return $arg
Expand Down Expand Up @@ -345,7 +345,7 @@ skinparam package {
!return $stereos
!endfunction

' if $sprite/$techn is an empty argument, try to calculate it via the defined $tag
' if $sprite/$techn is an empty argument, try to calculate it via the defined $tag
!unquoted function $toElementArg($arg, $tags, $varPostfix, $elementType)
!if ($arg > "")
!return $arg
Expand Down Expand Up @@ -729,7 +729,7 @@ $elementSkin
!endif
!if ($fontColor == "" && $bgColor == "")
!$tagDetails = $tagDetails + $LEGEND_NO_FONT_BG_TEXT + ", "
!else
!else
!if ($fontColor == "")
!$tagDetails = $tagDetails + $LEGEND_NO_FONT_TEXT + ", "
!endif
Expand Down Expand Up @@ -762,7 +762,7 @@ $elementSkin
!else
!$tagDetails = %substr($tagDetails, 0, %strlen($tagDetails)-2)
!$tagDetails = $tagDetails + ")</size>"
!endif
!endif
!else
!$brPos = %strpos($legendText, "\n")
!if ($brPos > 0)
Expand Down Expand Up @@ -840,7 +840,7 @@ $elementSkin
!else
!$tagDetails = %substr($tagDetails, 0, %strlen($tagDetails)-2)
!$tagDetails = $tagDetails + ")</size>"
!endif
!endif
!else
!$brPos = %strpos($legendText, "\n")
!if ($brPos > 0)
Expand Down Expand Up @@ -1065,7 +1065,7 @@ $elementSkin
!if ($brPos > 0)
!$multiLine = $multiLine + %substr($text, 0, $brPos) + $usedNewLine
!else
' <U+00A0> non breaking change that newLine breaks with formats can be used with \n\n
' <U+00A0> non breaking change that newLine breaks with formats can be used with \n\n
!$multiLine = $multiLine + "<U+00A0>" + $usedNewLine
!endif
!$text = %substr($text, $brPos+2)
Expand Down Expand Up @@ -1148,7 +1148,7 @@ $elementSkin
!$baseProp = $getElementBase($label, $techn, $descr, $sprite) + $getProps()
!$stereo = $toStereos($elementType,$tags)
!$calcLink = $getLink($link)

!$line = $umlShape + " " + %chr(34) + $baseProp + %chr(34) +" " + $stereo + " as " + $alias + $calcLink
!return $line
!endfunction
Expand Down Expand Up @@ -1228,7 +1228,7 @@ SetPropertyHeader("Property","Value")
!function $getLegendDetailsSize($detailsFormat)
!if $detailsFormat == $LEGEND_DETAILS_NONE
!$size = 0
!elseif $detailsFormat == $LEGEND_DETAILS_SMALL
!elseif $detailsFormat == $LEGEND_DETAILS_SMALL
!$size = $LEGEND_DETAILS_SMALL_SIZE
!else
!$size = $LEGEND_DETAILS_NORMAL_SIZE
Expand Down Expand Up @@ -1354,12 +1354,12 @@ hide stereotype
top to bottom direction
!endprocedure

!procedure LAYOUT_LEFT_RIGHT()
!procedure LAYOUT_LEFT_RIGHT()
!global $fix_direction = %false()
left to right direction
!endprocedure

!procedure LAYOUT_LANDSCAPE()
!procedure LAYOUT_LANDSCAPE()
!global $fix_direction = %true()
left to right direction
!endprocedure
Expand All @@ -1374,7 +1374,7 @@ left to right direction
!endfunction

!function Small()
!return $LEGEND_DETAILS_SMALL
!return $LEGEND_DETAILS_SMALL
!endfunction

' has to be last call in diagram
Expand Down Expand Up @@ -1695,4 +1695,4 @@ $from -[hidden]L- $to
' If a direction is required the Lay_...() methods can be used
!unquoted procedure Lay_Distance($from, $to, $distance="0")
$from $getHiddenLine($distance) $to
!endprocedure
!endprocedure
2 changes: 1 addition & 1 deletion architecture-as-code/diagrams/lib/C4_Component.puml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ endlegend

!unquoted procedure ComponentQueue_Ext($alias, $label, $techn="", $descr="", $sprite="", $tags="", $link="")
$getElementLine("queue", "external_component", $alias, $label, $techn, $descr, $sprite, $tags, $link)
!endprocedure
!endprocedure
2 changes: 1 addition & 1 deletion architecture-as-code/diagrams/lib/C4_Container.puml
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ endlegend
!endif
' $type defined via $tag style
Boundary($alias, $label, "", $allTags, $link, $descr)
!endprocedure
!endprocedure
2 changes: 1 addition & 1 deletion architecture-as-code/diagrams/lib/C4_Context.puml
Original file line number Diff line number Diff line change
Expand Up @@ -444,4 +444,4 @@ rectangle "$getPerson($label, $type, $descr, $sprite)$getProps()" $toStereos("ex
!endif
' $type defined via $tag style
Boundary($alias, $label, "", $allTags, $link, $descr)
!endprocedure
!endprocedure
8 changes: 4 additions & 4 deletions superset/prometheus_stats_logger.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from superset.stats_logger import BaseStatsLogger
from typing import Optional

from superset.stats_logger import BaseStatsLogger

try:
from werkzeug.middleware.dispatcher import DispatcherMiddleware
from prometheus_client import make_wsgi_app, Counter, Gauge, Summary
from prometheus_client import Counter, Gauge, Summary

class PrometheusStatsLogger(BaseStatsLogger):
def __init__(self, prefix: str = "superset") -> None:
Expand All @@ -24,7 +24,7 @@ def __init__(self, prefix: str = "superset") -> None:

self._summary = Summary(
f"{self.prefix}_summary",
f"Summary metric for Superset",
"Summary metric for Superset",
labelnames=["key"],
)

Expand Down

0 comments on commit 339e806

Please sign in to comment.