In a bowl, mix flour, sugar, salt, and cocoa powder.
Add softened butter and blend until crumbly.
Stir in the egg and wine or vinegar until a dough forms.
Knead the dough for about 5 minutes until smooth.
Wrap the dough in plastic wrap and let it rest for 1 hour.
Roll out the dough thinly and cut into circles.
Wrap the circles around cannoli tubes and seal the edges with water.
Heat oil in a deep pan to 375°F (190°C).
Fry the shells until golden brown, about 2-3 minutes.
Remove and drain on paper towels, then cool completely.
In a bowl, combine ricotta, powdered sugar, and vanilla until smooth.
Fold in chocolate chips, then fill the cooled shells.
Garnish with pistachios and dust with powdered sugar before serving.